package hy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
//@SpringBootApplication相当于下面三个注解：
@SpringBootConfiguration//Configuration
@EnableAutoConfiguration
@ComponentScan
public class WwApplication {

	public static void main(String[] args) {
		ApplicationContext ac=SpringApplication.run(WwApplication.class, args);
		System.out.println(ac.containsBean("myCfg2"));
		String[]arr=ac.getBeanDefinitionNames();
		System.out.println("=========================");
		for(String s:arr){
			System.out.println(s);
		}
	}

}
